import axios from 'axios'

export const getlist = (page, size) =>
  axios.get('http://localhost:3000/good-classify/list', {
    params: { page, size }
  })

export const addClassify = title =>
  axios.post('http://localhost:3000/good-classify/add', { title })

export const deleteClassify = classifyId =>
  axios.delete(`http://localhost:3000/good-classify/${classifyId}`)

export const updateTitle = (id, title) =>
  axios.post('http://localhost:3000/good-classify/update', {
    id,
    title
  })
